﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Web;
using MN.Framework.Common;

namespace EmailSender.Models
{
    [Table("SmtpCredential")]
    public class SmtpCredentialModel : BaseEntity
    {
        [Key]
        [Column("CredentialId")]
        public override int ID { get; set; }

        [Display(Name = "عنوان")]
        public string Title { get; set; }

        [Display(Name = "نام کاربری")]
        public string UserName { get; set; }

        [Display(Name = "رمز عبور")]
        public string Password { get; set; }

        [Display(Name = "شناسه سرور")]
        public int SmtpServerId { get; set; }


        [Display(Name = "ایمیل ارسال کننده")]
        public string EmailFrom { get; set; }

        [Required(ErrorMessage = "مقدار ایمیل پاسخ الزامی است")]
        [Display(Name = "ایمیل پاسخ")]
        public string ReplayTo { get; set; }

        [ForeignKey("SmtpServerId")]
        public virtual SmtpServerModel SmtpServer { get; set; }

    }
}